package com.haha.helloworld.event;

import android.app.Activity;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

public class MyClickListener implements View.OnClickListener {

    private Activity activity;

    public MyClickListener(Activity activity){
        this.activity=activity;
    }

    @Override
    public void onClick(View v) {
        Log.d("外部类实现","click");
        Toast.makeText(activity, "我被点击了", Toast.LENGTH_SHORT).show();
    }
}
